package vista;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class VistaSuperficieJuego extends JPanel {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	ImageIcon imagenFondo = new ImageIcon(getClass().getClassLoader().getResource("imagenes/fondoTablero.jpg"));
	public VistaSuperficieJuego (JFrame frame){
		this.setBackground(new Color(30,0,4));
		this.setPreferredSize(new Dimension(400,400));	
	
	}
	
	@Override
	public void paintComponent (Graphics g){
		Dimension tamanio = getSize();		
		g.drawImage(this.imagenFondo.getImage(),0,0,tamanio.width, tamanio.height, null);
		setOpaque(false);
		super.paintComponent(g);
	}
	
	
}
